package cn.gson.school.entity.jiaoxue;

import java.security.Timestamp;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.fasterxml.jackson.annotation.JsonFormat;

import cn.gson.school.entity.xitong.DeptEntity;
import cn.gson.school.entity.xitong.UserInfoEntity;

/**
 * 课程表
 */
@Entity
@Table(name = "tb_jx_class_schedule")
public class ClassScheduleEntity {
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	@Column(name="class_schedule_id")
	private Long curriculumId;// 课程id 主键

	@OneToOne
	@JoinColumn(name = "class_id")
	private ClassEntity classId;// 班级id 外键

	@Column(name="class_date")
	private Timestamp classDate;// 上课日期
	
	@Column(name="class_time")
	@JsonFormat(pattern="yyyy-MM-ddHH:mm:ss")
	private Date classTime;// 上课时间
	
	@OneToOne
	@JoinColumn(name="dept_id")
	private DeptEntity deptId;// 上课部门

	@ManyToOne
	@JoinColumn(name = "userinfo_id")
	private UserInfoEntity userinfoId;// 任课教员
	
	@Column(name="class_content")
	private String classContent;// 上课内容
	
	@Column(name="class_room")
	private String classroom;// 上课教室

	@Column(name = "is_delete")
	private Integer delete;

	
	public Integer getDelete() {
		return delete;
	}

	public void setDelete(Integer delete) {
		this.delete = delete;
	}
	
	public Long getCurriculumId() {
		return curriculumId;
	}

	public void setCurriculumId(Long curriculumId) {
		this.curriculumId = curriculumId;
	}

	public ClassEntity getClassId() {
		return classId;
	}

	public void setClassId(ClassEntity classId) {
		this.classId = classId;
	}

	public Timestamp getClassDate() {
		return classDate;
	}

	public void setClassDate(Timestamp classDate) {
		this.classDate = classDate;
	}

	public Date getClassTime() {
		return classTime;
	}

	public void setClassTime(Date classTime) {
		this.classTime = classTime;
	}

	public DeptEntity getDeptId() {
		return deptId;
	}

	public void setDeptId(DeptEntity deptId) {
		this.deptId = deptId;
	}

	public UserInfoEntity getUserinfoId() {
		return userinfoId;
	}

	public void setUserinfoId(UserInfoEntity userinfoId) {
		this.userinfoId = userinfoId;
	}

	public String getClassContent() {
		return classContent;
	}

	public void setClassContent(String classContent) {
		this.classContent = classContent;
	}

	public String getClassroom() {
		return classroom;
	}

	public void setClassroom(String classroom) {
		this.classroom = classroom;
	}

	@Override
	public String toString() {
		return "ClassScheduleEntity [curriculumId=" + curriculumId + ", classId=" + classId + ", classDate=" + classDate
				+ ", classTime=" + classTime + ", deptId=" + deptId + ", userinfoId=" + userinfoId + ", classContent="
				+ classContent + ", classroom=" + classroom + ", delete=" + delete + "]";
	}
}
